//
//  UpdateInfoView.m
//  GetFit3.0
//
//  Created by 黄建华 on 2017/10/10.
//  Copyright © 2017年 lxc. All rights reserved.
//

#import "UpdateInfoView.h"

@implementation UpdateInfoView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        
        self.backgroundColor = [UIColor blackColor];
        self.layer.masksToBounds = YES;
        self.layer.cornerRadius = 10;
        
        //        [_findPhoneButton setTitleNormal:HHH_Text(@"Bracelet is calling the phone")];
        
        UILabel *label01 = [[UILabel alloc] initWithFrame:CGRectMake(20, 10, kSCREEN_WIDTH - 40, 20)];
        label01.textColor = WELLGOCOLORWHITE;
        label01.textAlignment = NSTextAlignmentCenter;
        label01.font = [UIFont systemFontOfSize:18.0];
        label01.text = HHH_Text(@"发现硬件固件升级");
        [self addSubview:label01];
        
        UILabel *label02 = [[UILabel alloc] initWithFrame:CGRectMake(20, 40, kSCREEN_WIDTH - 40, 60)];
        label02.textColor = WELLGOCOLORWHITE;
        label02.font = [UIFont systemFontOfSize:13.0];
        label02.numberOfLines = 3;
        label02.textAlignment = NSTextAlignmentCenter;
        label02.text = HHH_Text(@"请继续完成硬件的固件更新，否则无法使用.");
        [self addSubview:label02];
        
        UIView *view = [[UIView alloc] init];
        view.layer.masksToBounds = YES;
        view.layer.cornerRadius = 6;
        view.backgroundColor = WELLGOCOLORWHITE;
        view.frame = CGRectMake(120, 105, kSCREEN_WIDTH - 240, 40);
        [self addSubview:view];
        
        UIButton *button = [[UIButton alloc] init];
        button.frame = CGRectMake(120, 105, kSCREEN_WIDTH - 240, 40);
        [button addTarget:self action:@selector(findBleButtonClick) forControlEvents:UIControlEventTouchUpInside];
        [button setTitleNormal:HHH_Text(@"确定")];
        [button setTitleColor:WELLGOCOLORBLACK forState:UIControlStateNormal];
        [self addSubview:button];
    }
    return self;
}

- (void)findBleButtonClick
{
    [self dismissPopup];
    [kK_App pushUpdateVc];
}

@end
